REM *******************************************
REM * LCD type select - FF-AA120A - Default -
REM * 2009/12/09 KKPoon
REM *******************************************
REM * LCDID_DEFAULT = 0,
REM * LCDID_INVALID = 0xFFFF,
REM <<< Yoda10 >>>
REM * LCDID_GPT_480x234 = 1,
REM * LCDID_WINTEK_480x234 = 2,
REM * LCDID_AUOVJ_480x234 = 3,
REM <<< Leia10/12, Yoda12 >>>
REM * LCDID_AUO_960x240 = 4,
REM * LCDID_GPT_960x240 = 5,
REM * LCDID_WINTEK_960x240 = 6,
REM * LCDID_GPT_960x240_3.0 = 7,
REM * LCDID_WINTEK_960x240_3.0 = 8,
REM * LCDID_TIANMA_960x240 = 9,
REM * LCDID_HITACHI_640X480 = 10,
REM *******************************************

10 FOREIGN ClearOSD()
REM 20 LET FOpenTest = "A:\OneCard$\OneCardParam.txt"
REM 30 LET ret = 0
REM 40 FOREIGN ret = FM_FileCmd(FOpenTest,1,1)
REM 50 IF ret < 0 THEN 60 ELSE 1000
REM 60 FOREIGN ScreenInt32_Hex(10,60,ret)
REM 70 SYSTEM delay_us(1000000)

100 LET LCD_Sel = 0

110 IF LCD_Sel == 0 THEN 120 ELSE 140
120 LET LCDTypeStr = "LCDID_DEFAULT"
130 GOTO 500

140 IF LCD_Sel == 1 THEN 150 ELSE 170
150 LET LCDTypeStr = "LCDID_GPT_480x234"
160 GOTO 500

170 IF LCD_Sel == 2 THEN 180 ELSE 200
180 LET LCDTypeStr = "LCDID_WINTEK_480x234"
190 GOTO 500

200 IF LCD_Sel == 3 THEN 210 ELSE 230
210 LET LCDTypeStr = "LCDID_AUOVJ_480x234"
220 GOTO 500

230 IF LCD_Sel == 4 THEN 240 ELSE 260
240 LET LCDTypeStr = "LCDID_AUO_960x240"
250 GOTO 500

260 IF LCD_Sel == 5 THEN 270 ELSE 290
270 LET LCDTypeStr = "LCDID_GPT_960x240"
280 GOTO 500

290 IF LCD_Sel == 6 THEN 300 ELSE 320
300 LET LCDTypeStr = "LCDID_WINTEK_960x240"
310 GOTO 500

320 IF LCD_Sel == 7 THEN 330 ELSE 350
330 LET LCDTypeStr = "LCDID_GPT_960x240_3.0"
340 GOTO 500

350 IF LCD_Sel == 8 THEN 360 ELSE 380
360 LET LCDTypeStr = "LCDID_WINTEK_960x240_3.0"
370 GOTO 500

380 IF LCD_Sel == 65535 THEN 390 ELSE 600
390 LET LCDTypeStr = "LCDID_INVALID"
400 GOTO 500


REM *** Setting LCD Type ***
500 SYSTEM ScreenString(10,100,LCDTypeStr)
510 SYSTEM delay_us(1000000)
520 FOREIGN ret = LCD_TypeSetup(LCD_Sel)
530 IF ret == 0 THEN 1000 ELSE 600


REM *** ERROR CASE ***
600 LET ErrString = "LCD type select error!!"
REM 610 FOREIGN OneCard_ErrPrint(ErrString)
610 SYSTEM ScreenString(10,120,ErrString)
620 SYSTEM delay_us(1000000)
630 FOREIGN ret = PowerOff(0,0)
640 GOTO 1000

1000 END
RUN